package com.yby.dome4;

public class Vehicle {
    String name;
    double speed;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getSpeed() {
        return speed;
    }

    public void setSpeed(double speed) {
        this.speed = speed;
    }

    public Vehicle(String name, double speed){
        this.name = name;
        this.speed = speed;
    }
    public void move(){
        System.out.println(name+"正在路上，以"+speed+"km/h行驶");
    }
}
